1. Field of the Invention
The present invention relates to an apparatus that establishes communications and relays a message based on the established communications, and a method and a computer program product for establishing communications.
2. Description of the Related Art
In recent years, a Session Initiation Protocol (SIP) has been widely known as a signaling protocol that is present between communication devices and controls and relays communications. A communication system (SIP system) employing the SIP uses an SIP proxy as a communication intermediary server device between SIP terminals as terminal devices. It is a general method to secure communications, using a Transport Layer Security (TLS) protocol as a transport protocol that connects between the SIP terminal and the SIP proxy. The SIP terminal and the SIP proxy are collectively called an SIP entity.
The TLS is a connection-oriented secure transport protocol. To distribute SIP messages using the TLS, a connection needs to be established between SIP entities by executing TLS handshake. J. Rosenberg et al., “RFC 3261, SIP:Session Initiation Protocol”, [online], June 2002, retrieved from the Internet: <URL:http://www.ietf.org/rfc/rfc3261.txt> discloses the use of the TLS as the transport protocol for the secure distribution of the SIP messages.
The outline process from when an SIP proxy B receives an SIP message from an SIP terminal A that transmits the SIP message until when the SIP proxy B distributes the SIP message to a destination SIP terminal C is explained next.
First, the SIP terminal A executes the handshake protocol of the TLS with the SIP proxy B. Accordingly, a secure connection is established between the SIP terminal A and the SIP proxy B. Next, the SIP terminal A transmits an SIP message encrypted by the TLS to the SIP proxy B, by using the established secure connection.
The SIP proxy B receives the encrypted SIP message, and fetches the SIP message by decrypting the TLS. The SIP proxy B references a Request-URI included in an SIP header, and determines a distribution destination of the received SIP message. For this purpose, the SIP proxy B can enquire an SIP location server, for example. The SIP proxy B executes the handshake protocol of the TLS with the SIP terminal C as the distribution destination of the SIP message. Accordingly, a secure connection is established between the SIP proxy B and the SIP terminal C.
Next, the SIP proxy B transmits the SIP message encrypted by the TLS, to the SIP terminal C, using the established secure connection. The SIP terminal C transmits an SIP response message, using the TLS connection established between the SIP proxy B and the SIP terminal C. The SIP proxy B distributes the received SIP response message, using the TLS connection established between the SIP terminal A and the SIP proxy B.
As described above, for the SIP proxy B to distribute the SIP message, the connection needs to be established by executing the handshake with each SIP terminal. Because plural messages are mutually exchanged in the handshake protocol, the process requires a certain time to establish the TLS connection.
In general, the SIP proxy cannot specify the destination SIP terminal to which the SIP message is to be distributed, until when the SIP proxy references the SIP header (Request-URI, in general) after receiving the SIP message. Therefore, after receiving the SIP message and after specifying the distribution destination, the SIP proxy needs to distribute the SIP message by establishing the TLS connection to the SIP terminal of the distribution destination.
According to the conventional method, the establishment of the TLS connection is started after specifying the distribution destination by receiving the SIP message. Therefore, a delay in the time required to complete the distribution of the SIP message increases.
The TLS connection does not need to be carried out each time when the SIP message is going to be transmitted. An established TLS connection can be also used to distribute the SIP message by maintaining the TLS connection. However, maintaining plural TLS connections is not desirable, because this compresses the storage capacity of the SIP proxy and the load of a central processing unit (CPU). Therefore, usually, in transmitting an SIP INVITE request message, a new TLS connection is established for each SIP transaction.